<div class="box">
  <div class="box-header">
    
    <ob_link><a id="data_backup" class="btn" url="{:url('dataBackup')}"><i class="fa fa-download"></i> 备份数据</a></ob_link>
    <ob_link><a id='optimize' class="btn" url="{:url('optimize')}"><i class="fa fa-shield"></i> 优 化</a></ob_link>
    <ob_link><a id='repair' class="btn" url="{:url('repair')}"><i class="fa fa-wrench"></i> 修 复</a></ob_link>
    
  </div>
    
  <div class="box-body">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>表名</th>
          <th>引擎</th>
          <th>注释</th>
          <th>数据量</th>
          <th>数据大小</th>
          <th>创建时间</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>{$vo.name}</td>
                  <td>{$vo.engine}</td>
                  <td>{$vo.comment}</td>
                  <td>{$vo.rows}</td>
                  <td>{$vo.data_length|format_bytes}</td>
                  <td>{$vo.create_time}</td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="6" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
  </div>

</div>



<script type="text/javascript">

    function sendUrlRequest(id)
    {
        $('.fakeloader').show();

            $.post( $("#" + id).attr("url"),{}, function(data){

                $('.fakeloader').hide();

                obalert(data);

            },"json"
        );
    }

    $("#data_backup").click(function(){ sendUrlRequest('data_backup'); });
    $("#optimize").click(function(){ sendUrlRequest('optimize'); });
    $("#repair").click(function(){ sendUrlRequest('repair'); });
    
</script>